<template>
  <a-modal
      :close-on-click-modal="false"
      :open="api.detailState.visible"
      :title="api.detailState.title"
      destroy-on-close
      @cancel="api.onCloseDetail()"
      @ok="api.onCloseDetail()"
  >
    <a-descriptions :column="1" >
      <a-descriptions-item label="上级部门">{{ api.detailState.form.parent.name }}</a-descriptions-item>
      <a-descriptions-item label="名称">{{ api.detailState.form.name }}</a-descriptions-item>
    </a-descriptions>
  </a-modal>
</template>

<script setup lang="ts">
import {CompanyApi} from "~/api/system/company.api";
import {OrgApi} from "~/api/system/org.api";

interface Props {
  api: OrgApi;
}

const { api } = withDefaults(defineProps<Props>(), {});

</script>

<style scoped lang="scss">

</style>
